<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>递归</title>
</head>
<body>
<script type="text/javascript">

    function jc(n){

        if(n===1){
            return 1;
        }else{
            return n * jc(n-1);
        }
    }
    console.log(jc(5));

</script>
</body>
</html>